package tom.spring.cloud.consumer.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import tom.spring.cloud.consumer.client.Provider02SleuthClient;

/**
 * @author ZHUFEIFEI
 */
@RestController
@RequestMapping("hello")
public class HelloController {

    @Autowired
    private Provider02SleuthClient client;

    @GetMapping("sleuth")
    public String hello() {
        return this.client.hello();
    }

    @GetMapping
    public String local() {
        return "hello";
    }
}
